import { fromJS } from 'immutable';
import mutations from '@/mutations/homeMutation'

// 初始化数据
const initState = fromJS({
  swiperData: [{ id: 0, img: 'http://img.1314000.cn/listbg.jpg', title: '默认' }],
  hotcate: []
})

export default (state = initState, { type, payload }) => mutations[type] ? mutations[type](state, payload) : state